package action.system;

import java.util.List;

import core.action.BaseAction;
import model.security.UsrAuth;
import model.security.UsrRes;
import model.security.UsrRole;
import model.security.UsrUser;
import service.system.SystemListService;
import service.system.SystemUsraddService;

public class SystemUsraddAction extends BaseAction{
	private SystemUsraddService usraddService;
	private UsrUser user;
	private UsrRole role;
	private UsrRes res;
	private UsrAuth auth;
	
	private String password1;
	private String password2;
	
	private SystemListService systemListService;
	private List allrole;
	private String user_now_role;
	
	public String FLAG="ADD";
	
	private List role_not_in_auth;
		
	//--------------user------------------------
	public String adduser(){
		this.allrole=systemListService.get_allrole();
		this.user_now_role="1";
		super.successResultValue="systemUserEdit";
		return "function";
	}

	//--------------role------------------------
	public String addrole(){
		role_not_in_auth=systemListService.get_role_in_auth();
		super.successResultValue="systemRoleEdit";
		return "function";
	}
	
	//--------------auth------------------------
	public String addauth(){
		super.successResultValue="systemAuthEdit";
		return "function";
	}
	//--------------res------------------------
	public String addres(){
		super.successResultValue="systemResEdit";
		return "function";
	}
	
	public String execute(){
		return "success";
	}
	public SystemUsraddService getUsraddService() {
		return usraddService;
	}
	public void setUsraddService(SystemUsraddService usraddService) {
		this.usraddService = usraddService;
	}

	public UsrUser getUser() {
		return user;
	}

	public void setUser(UsrUser user) {
		this.user = user;
	}

	public UsrRole getRole() {
		return role;
	}

	public void setRole(UsrRole role) {
		this.role = role;
	}

	public UsrRes getRes() {
		return res;
	}

	public void setRes(UsrRes res) {
		this.res = res;
	}

	public UsrAuth getAuth() {
		return auth;
	}

	public void setAuth(UsrAuth auth) {
		this.auth = auth;
	}

	public String getPassword1() {
		return password1;
	}

	public void setPassword1(String password1) {
		this.password1 = password1;
	}

	public String getPassword2() {
		return password2;
	}

	public void setPassword2(String password2) {
		this.password2 = password2;
	}

	public SystemListService getSystemListService() {
		return systemListService;
	}

	public void setSystemListService(SystemListService systemListService) {
		this.systemListService = systemListService;
	}

	public List getAllrole() {
		return allrole;
	}

	public void setAllrole(List allrole) {
		this.allrole = allrole;
	}

	public String getUser_now_role() {
		return user_now_role;
	}

	public void setUser_now_role(String user_now_role) {
		this.user_now_role = user_now_role;
	}

	public List getRole_not_in_auth() {
		return role_not_in_auth;
	}

	public void setRole_not_in_auth(List role_not_in_auth) {
		this.role_not_in_auth = role_not_in_auth;
	}

}
